﻿using System;
using log4net;
using Spider.Service;

namespace Spider
{
    internal class Program
    {
        private static readonly ILog Log = LogManager.GetLogger(typeof(Program));

        public static void Main(string[] args)
        {
            Log.Info("hello spider");
            IpProxyPool.CrawlingProxyPool();
//                        CrawlerService.CrawlingAndStoreYunFincalNews();
//                        CrawlerService.CrawlingDadayouziWechatFupan();
//                        CrawlerService.CrawlingCloseReasonRealTime();
//                        CrawlerService.CrawlingCompanyNotice();
//                        CrawlerService.CrawlingQa();
//            CrawlerService.CrawlingDadayouziWechatFupan();
            Init();
            Console.ReadKey();
//            Destory();
        }

        public static void Init()
        {
            Log.Info("程序初始化");
            TaskConfig.RunTask();
        }

        public static void Destory()
        {
            TaskConfig.Destroy();
            Log.Info("程序退出结束");
        }
    }
}